]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Hide folder icon when dialog is open
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 5 Jun 2020 02:24:20 +0000 (23:24 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 9 Jun 2020 19:14:30 +0000 (16:14 -0300)
In such a way that gives the illusion of the icon becoming
the dialog itself.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301

js/ui/appDisplay.js

index c7636c922c1853cca304108dbe7d8b0f3a914c74..d8e897d5cb2cc72526edd3303aacd7cd90eaa5df 100644 (file)
@@ -1391,6 +1391,18 @@ var FolderIcon = GObject.registerClass({
                 this._parentView);
             this._parentView.addFolderDialog(this._dialog);
             this._dialog.connect('open-state-changed', (popup, isOpen) => {
+                const duration = FOLDER_DIALOG_ANIMATION_TIME / 2;
+                const mode = isOpen
+                    ? Clutter.AnimationMode.EASE_OUT_QUAD
+                    : Clutter.AnimationMode.EASE_IN_QUAD;
+
+                this.ease({
+                    opacity: isOpen ? 0 : 255,
+                    duration,
+                    mode,
+                    delay: isOpen ? 0 : FOLDER_DIALOG_ANIMATION_TIME - duration,
+                });
+
                 if (!isOpen)
                     this.checked = false;
             });